

'''首页'''
from selenium.webdriver.common.by import By

from page_objects.base_page import BasePage


class HomePage(BasePage):

    _MANAGE_OPRATE = (By.XPATH, "//*[text()='商场管理']")
    _MANAGE_LIST = (By.XPATH, "//*[text()='商品类目']")

    """系统首页，进入商品类目"""
    def go_to_category(self):
        # 点击菜单”商场管理“
        self.do_find(self._MANAGE_OPRATE).click()

        # 点击菜单”商品类目“
        self.do_find(self._MANAGE_LIST).click()
        # ==》类目列表页面
        from page_objects.category_list_page import CategoryListPage
        return CategoryListPage(self.driver)
